#define _CRT_SECURE_NO_WARNINGS
#include "BTree.h"

int main()
{
	char a[100] = { 0 };
	scanf("%s", a);
	int i = 0;

	BTNode* root=BinaryTreeCreate(a, &i);

	int size=BinaryTreeSize(root);
	printf("%d\n", size);

	int leafsize = BinaryTreeLeafSize(root);
	printf("%d\n", leafsize);

	int ksize = BinaryTreeLevelKSize(root, 3);
	printf("%d\n", ksize);

	BTNode* node=BinaryTreeFind(root, 'C');
	if(node)
	    printf("%c\n", node->val);

	BinaryTreePrevOrder(root);
	printf("\n");

	BinaryTreeInOrder(root);
	printf("\n");

	BinaryTreePostOrder(root);
	printf("\n");

	BinaryTreeLevelOrder(root);
	printf("\n");

	int ret=BinaryTreeComplete(root);
	printf("%d\n", ret);

	BinaryTreeDestory(root);
	root = NULL;
	return 0;
}